#ifndef RECORD_DESKTOP_GDI
#define RECORD_DESKTOP_GDI

#include "record_desktop.h"
#ifdef _WIN32
#include <Windows.h>


class record_desktop_gdi :
	public record_desktop
{
public:
	record_desktop_gdi();
	~record_desktop_gdi();

	virtual int init(
		const Rect& rect,
		const int fps);

	virtual int start();
	virtual int pause();
	virtual int resume();
	virtual int stop();

protected:
	virtual void clean_up();

private:
	void draw_cursor(HDC hdc);

	int do_record();


	void record_func();

	std::atomic_bool _draw_cursor;

	HDC _hdc;
	HBITMAP _bmp, _bmp_old;
	CURSORINFO _ci;
};

#endif
#endif
